package com.threads.thread;

import java.util.Random;

public class ExtendsThread extends Thread  {

	@Override
	public void run() {

		for (int i = 0; i < 10; i++) {

			try {

				System.out.println("I a from Thread Extends >>> run method ----" +i);

				Random random = new Random(2);

				Thread.currentThread().sleep(1000);

				if (i == 5) {

					return;
				}

			} catch (Exception e) {
				// TODO: handle exception
			}

		}

	}
}
